//
//  YXAccessibilityTableViewCell.m
//  MockProject
//
//  Created by FanYu on 25/8/2016.
//  Copyright © 2016 niuzhaowang. All rights reserved.
//

#import "YXAccessibilityTableViewCell.h"

@implementation YXAccessibilityTableViewCell

- (IBAction)switchTapped:(UISwitch *)sender {
    [self.delegate switchTapped:sender];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.titleLabel.textColor = [UIColor colorWithHexString:@"403e3d"];
    self.titleLabel.font = [UIFont systemFontOfSize:16];

    self.switcher.tintColor = [UIColor colorWithHexString:@"ff7000"];
    self.switcher.onTintColor = [UIColor colorWithHexString:@"ff7000"];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setCellModel:(YXSettingCellModel *)cellModel {
    _cellModel = cellModel;
    self.titleLabel.text = cellModel.title;
    self.switcher.on = cellModel.isOn;
}

@end
